/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exception;

import entities.Plano;
import javax.ejb.ApplicationException;

/**
 *
* @author Sostenes, Thiago, Felipe
 */
@ApplicationException(rollback = true)
public class PlanoExistsException extends Exception {
    
    private Plano plano;

    public PlanoExistsException(Plano plano) {
        super("O plano " + plano.getNome() + " já existe");
        this.plano = plano;
    }
    
    public Plano getPlano() {
        return plano;
    }
}
